package santiago.view.menu;

import santiago.client.Client;
import santiago.view.SantiagoFrame;

public class FrameMainMenu extends SantiagoFrame {

    private String Login;

    /**
     * Creates new form FrameMainMenu
     */
    public FrameMainMenu(String Login) {
        super();
        this.Login = Login;
        initComponents();
        setLocationRelativeTo(null);
    }

    @Override
    public void refresh() {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        ButtonQuit = new javax.swing.JButton();
        ButtonAbout = new javax.swing.JButton();
        ButtonHowToPlay = new javax.swing.JButton();
        ButtonPlayerStatistics = new javax.swing.JButton();
        ButtonJoinServer = new javax.swing.JButton();
        LabelWelcome = new javax.swing.JLabel();
        LabelBackground = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("Santiago");
        setMinimumSize(new java.awt.Dimension(1024, 760));
        setResizable(false);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        ButtonQuit.setFont(new java.awt.Font("Lucida Sans", 1, 18)); // NOI18N
        ButtonQuit.setForeground(new java.awt.Color(179, 96, 74));
        ButtonQuit.setText("Quitter");
        ButtonQuit.setActionCommand("Quit");
        ButtonQuit.setMaximumSize(new java.awt.Dimension(400, 30));
        ButtonQuit.setMinimumSize(new java.awt.Dimension(400, 30));
        ButtonQuit.setOpaque(false);
        ButtonQuit.setPreferredSize(new java.awt.Dimension(400, 30));
        ButtonQuit.setVerifyInputWhenFocusTarget(false);
        ButtonQuit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ButtonQuitActionPerformed(evt);
            }
        });
        getContentPane().add(ButtonQuit, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 460, 410, 30));
        ButtonQuit.getAccessibleContext().setAccessibleName("");

        ButtonAbout.setFont(new java.awt.Font("Lucida Sans", 1, 18)); // NOI18N
        ButtonAbout.setForeground(new java.awt.Color(179, 96, 74));
        ButtonAbout.setText("Crédits");
        ButtonAbout.setBorder(null);
        ButtonAbout.setFocusPainted(false);
        ButtonAbout.setMaximumSize(new java.awt.Dimension(400, 30));
        ButtonAbout.setMinimumSize(new java.awt.Dimension(400, 30));
        ButtonAbout.setOpaque(false);
        ButtonAbout.setPreferredSize(new java.awt.Dimension(400, 30));
        ButtonAbout.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ButtonAboutActionPerformed(evt);
            }
        });
        getContentPane().add(ButtonAbout, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 420, 410, 30));
        ButtonAbout.getAccessibleContext().setAccessibleName("");

        ButtonHowToPlay.setFont(new java.awt.Font("Lucida Sans", 1, 18)); // NOI18N
        ButtonHowToPlay.setForeground(new java.awt.Color(179, 96, 74));
        ButtonHowToPlay.setText("Comment jouer");
        ButtonHowToPlay.setBorder(null);
        ButtonHowToPlay.setFocusPainted(false);
        ButtonHowToPlay.setMaximumSize(new java.awt.Dimension(400, 30));
        ButtonHowToPlay.setMinimumSize(new java.awt.Dimension(400, 30));
        ButtonHowToPlay.setOpaque(false);
        ButtonHowToPlay.setPreferredSize(new java.awt.Dimension(400, 30));
        ButtonHowToPlay.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ButtonHowToPlayActionPerformed(evt);
            }
        });
        getContentPane().add(ButtonHowToPlay, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 380, 410, 30));
        ButtonHowToPlay.getAccessibleContext().setAccessibleName("");

        ButtonPlayerStatistics.setFont(new java.awt.Font("Lucida Sans", 1, 18)); // NOI18N
        ButtonPlayerStatistics.setForeground(new java.awt.Color(179, 96, 74));
        ButtonPlayerStatistics.setText("Voir mes statistiques");
        ButtonPlayerStatistics.setActionCommand("voirMesStats");
        ButtonPlayerStatistics.setMaximumSize(new java.awt.Dimension(400, 30));
        ButtonPlayerStatistics.setMinimumSize(new java.awt.Dimension(400, 30));
        ButtonPlayerStatistics.setOpaque(false);
        ButtonPlayerStatistics.setPreferredSize(new java.awt.Dimension(400, 30));
        ButtonPlayerStatistics.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ButtonPlayerStatisticsActionPerformed(evt);
            }
        });
        getContentPane().add(ButtonPlayerStatistics, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 340, 410, -1));
        ButtonPlayerStatistics.getAccessibleContext().setAccessibleName("");

        ButtonJoinServer.setFont(new java.awt.Font("Lucida Sans", 1, 18)); // NOI18N
        ButtonJoinServer.setForeground(new java.awt.Color(179, 96, 74));
        ButtonJoinServer.setText("Rejoindre un serveur");
        ButtonJoinServer.setBorder(null);
        ButtonJoinServer.setFocusPainted(false);
        ButtonJoinServer.setMaximumSize(new java.awt.Dimension(400, 30));
        ButtonJoinServer.setMinimumSize(new java.awt.Dimension(400, 30));
        ButtonJoinServer.setOpaque(false);
        ButtonJoinServer.setPreferredSize(new java.awt.Dimension(400, 30));
        ButtonJoinServer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ButtonJoinServerActionPerformed(evt);
            }
        });
        getContentPane().add(ButtonJoinServer, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 300, 410, 30));
        ButtonJoinServer.getAccessibleContext().setAccessibleName("");

        LabelWelcome.setFont(new java.awt.Font("Lucida Sans", 1, 18)); // NOI18N
        LabelWelcome.setForeground(new java.awt.Color(255, 255, 255));
        LabelWelcome.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        LabelWelcome.setText("Bienvenue " + Login);
        LabelWelcome.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        getContentPane().add(LabelWelcome, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 160, 1020, -1));

        LabelBackground.setBackground(new java.awt.Color(138, 192, 208));
        LabelBackground.setIcon(new javax.swing.ImageIcon(getClass().getResource("/santiago/ressources/fond-menu-principal.png"))); // NOI18N
        LabelBackground.setMaximumSize(new java.awt.Dimension(1024, 760));
        LabelBackground.setMinimumSize(new java.awt.Dimension(1024, 760));
        LabelBackground.setPreferredSize(new java.awt.Dimension(1024, 760));
        getContentPane().add(LabelBackground, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void ButtonJoinServerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonJoinServerActionPerformed
        Client.getInterface().joinServer();
    }//GEN-LAST:event_ButtonJoinServerActionPerformed

    private void ButtonPlayerStatisticsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonPlayerStatisticsActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ButtonPlayerStatisticsActionPerformed

    private void ButtonHowToPlayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonHowToPlayActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ButtonHowToPlayActionPerformed

    private void ButtonAboutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonAboutActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_ButtonAboutActionPerformed

    private void ButtonQuitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonQuitActionPerformed
        // TODO close connection to login server ?
        System.exit(0);
    }//GEN-LAST:event_ButtonQuitActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton ButtonAbout;
    private javax.swing.JButton ButtonHowToPlay;
    private javax.swing.JButton ButtonJoinServer;
    private javax.swing.JButton ButtonPlayerStatistics;
    private javax.swing.JButton ButtonQuit;
    private javax.swing.JLabel LabelBackground;
    private javax.swing.JLabel LabelWelcome;
    // End of variables declaration//GEN-END:variables
}
